#pragma once
#include "circuitunitdisobj.h"
#include "dcl_InterfaceCircuit.h"

class HPoint;
class DEF_INTERFACECIRCUIT CCircuitPortDisObj :
	public CCircuitUnitDisObj
{
public:
	CCircuitPortDisObj(CCircuitPort *pCircuitPort);
	CCircuitPortDisObj(const CCircuitPortDisObj *pDisObj, CCircuitPort *pCircuitPort=NULL);
	~CCircuitPortDisObj(void);

public:
	virtual void Serialize(CArchive & ar);
	virtual void Display(CHoopsMap *pHoopsMap);
	virtual void Transform(const CMatrix transf);
	virtual CObj * Clone() const;
	virtual bool GetBox(double & dblLeft, double & dblBottom, double & dblRight, double & dblTop) const;
	virtual eCircuitUnitType GetCircuitUnitType() const;

public:
	void DrawOriginPort();
	HPoint GetLinkPt1();
	HPoint GetLinkPt2();
	bool GetLinkPt(HPoint &pt1, HPoint &pt2);
	HPoint GetSubLineConnectPt();
};

